import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { LayoutPassportComponent } from '../../layout/passport/passport.component';
import { UserLoginComponent } from './components/login/login.component';
import { OrderAgreementComponent } from './components/order-agreement/order-agreement.component';
import { UserRetrievePasswordComponent } from './components/retrieve-password/retrieve-password.component';

const routes: Routes = [
  // passport
  {
    path: 'passport',
    component: LayoutPassportComponent,
    children: [
      {
        path: 'login',
        component: UserLoginComponent,
        data: { title: '登录' }
      },
      {
        path: 'agreement',
        component: OrderAgreementComponent,
        data: { title: '协议' }
      },
      {
        path: 'retrieve-password',
        component: UserRetrievePasswordComponent,
        data: { title: '忘记密码' }
      }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class PassportRoutingModule {}
